package org.springtx.service;


import java.util.Map;

import javax.sql.DataSource;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

public final class Boot {

	  private static ApplicationContext applicationContext;
	  private static final String CONFIGPATH_ANNO  = "applicationContext_annotx.xml";
	  private static final String CONFIGPATH_AOP  = "applicationContext_aoptx.xml";

	  public static void main(final String[] args) throws Exception {
		  applicationContext = new ClassPathXmlApplicationContext(CONFIGPATH_AOP);
		  FooService fooService = (FooService) applicationContext.getBean("fooService");
		  fooService.getFoo("呵呵","");
//		  JdbcTemplate jdbcTemplate = (JdbcTemplate) applicationContext.getBean("jdbcTemplate");
//		  Map<String, Object> map =  jdbcTemplate.queryForMap("select * from t_user");
//		  System.out.println(map.toString());
	  }
	}